package com.eternalrights.mapper;

import com.eternalrights.pojo.Student;
import com.eternalrights.pojo.StudentQueryReuslt;
import com.eternalrights.pojo.ViolationData;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Mapper
public interface StudentMapper {
    public List<Student> list(StudentQueryReuslt studentQueryReuslt);

    public void insert(Student student);

    public Student getById(Integer id);

    public void update(Student student);

    public void delete(List<Integer> ids);

    public ViolationData countViolation(Integer id);

    public void updateViolation(Integer violationCount,Integer violationScore,Integer id);

    public void updateUpdateTime(LocalDateTime updateTime,Integer id);

    @MapKey("pos")
    public List<Map<String,Object>> getStudentCountData();

    @MapKey("pos")
    public List<Map<String,Object>> getStudentDegreeData();
}